import { Avatar, Space } from "antd";
import { UserOutlined } from "@ant-design/icons";

const TreeDepartmentItem = ({ data, selectNode }) => {
    return (
        <Space direction="vertical" style={{ backgroundColor: selectNode?.id === data.id ? "#eee" : "#fff", width: "auto", padding: "10px 16px" }}>
            <div style={{ borderBottom: "1px solid #ddd", padding: "0 0 10px" }}>{data.oiName}</div>
            {data.maInfo?.osUuid ? (
                <Space style={{ textAlign: "center" }}>
                    {/* <Avatar shape="square" src={<UserOutlined />} size={40} style={{ color: "#000", backgroundColor: "#fff" }} /> */}
                    <Space direction="vertical" size={0} style={{ textAlign: "center", fontSize: 12, marginLeft: 5 }}>
                        <div style={{ fontSize: 15 }}>{data.maInfo?.osName}</div>
                        {/* <div style={{ color: "#999" }}>{data.oiType === "门店部门" ? "部门负责人" : "班组负责人"}</div> */}
                    </Space>
                </Space>
            ) : (
                "无"
            )}
        </Space>
    );
};

export default TreeDepartmentItem;
